﻿using CashFlow.Entities.Models;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using CashFlow.Entities;
//using CashFlow.Tests.Common;
using Should.Fluent;

namespace CashFlow.Entities.Tests
{
		
	[TestClass()]
	public class BillModelTest
	{
		[TestMethod]
		public void ToEntity()
		{
			var billModel = new BillModel { 
				AccountId = "10",
				Amount = 20d,
				BillType = 1,
				FirstDate = new DateTime(2010, 10, 5),
				Id = "3",
				PayeeName = "Costco",
				RecurrenceId = "3",
				TenantId = "2"
			};

			var bill = (Bill)billModel;

			bill.Amount.Should().Equal(-20d);
		}

		/// <summary>
		///A test for FromEntity
		///</summary>
		[TestMethod()]
		public void FromEntityTest()
		{
			var tenant = new Tenant("2");
			var bill = Bill.GetDefault(tenant);

			var actual = (BillModel)bill;
			
			actual.Should().Not.Be.Null();
		}
	}
}
